package com.pi.controller;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.pi.entity.SysUser;
import com.pi.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author TomFang
 * @version 1.0
 * @description: TODO
 * @date 2025/3/13 16:34
 */
@RestController
@RequestMapping("/user")
public class SysUserController {


    @Autowired
    private ISysUserService userService;

    @GetMapping("/list")
    public List<SysUser> list(SysUser sysUser)
    {
        return userService.selectSysUserList(sysUser);
    }

    @GetMapping("/us")
    @DS("p_mysql")
    public List<SysUser> pglist(SysUser sysUser)
    {
        return userService.selectSysUserList(sysUser);
    }
}
